package main

import "fmt"
import "sync"

func main() {
	u := new(user)
	u.lock.Lock()
	u.name = "zhangsan"
	u.age = 10
	u.lock.Unlock()
	fmt.Println(*u)
}

type user struct {
	lock sync.Mutex
	name string
	age  int
}
